//
//  ZCSearchInvolvedCell.m
//  zctx
//
//  Created by apple on 15/12/3.
//  Copyright © 2015年 sanliang. All rights reserved.
//

#import "ZCSearchInvolvedCell.h"

@implementation ZCSearchInvolvedCell

- (void)awakeFromNib {
    // Initialization code
    self.progreesView.arcFinishColor = [UIColor colorWithHexString:@"#03ab9e"];
    self.progreesView.arcUnfinishColor = [UIColor colorWithHexString:@"#03ab9e"];
    self.progreesView.arcBackColor = [UIColor colorWithHexString:@"#81d5ce"];
    self.stateLable.textColor = [UIColor colorWithHexString:@"#03ab9e"];
}

-(void)setModel:(ZCfollowModelContent *)Model{
    _Model = Model;
    
    self.titleLable.text =[NSString stringWithFormat:@"%@",Model.pjname];
    self.contentLable.text = [NSString stringWithFormat:@"%@",Model.packagename];
    self.adressLable.text = [NSString stringWithFormat:@"%@",Model.location];
    float priceStr = [[NSString stringWithFormat:@"%@",Model.finish]floatValue];
    float money = [[NSString stringWithFormat:@"%@",Model.emoney]floatValue];
    float finlishInt = priceStr/money;
    if (finlishInt>=1) {
        finlishInt = 1;
    }
    if (finlishInt>0 &&finlishInt<0.01) {
        finlishInt = 0.01;
    }
    self.progreesView.percent = finlishInt;
}

-(void)setSearchModel:(ZCSearchModel *)SearchModel{
    _SearchModel = SearchModel;
    
    self.titleLable.text =[NSString stringWithFormat:@"%@",_SearchModel.name];
    self.contentLable.text = [NSString stringWithFormat:@"%@",_SearchModel.packagename];
    self.adressLable.text = [NSString stringWithFormat:@"%@",_SearchModel.location];
    float priceStr = [[NSString stringWithFormat:@"%@",_SearchModel.finish]floatValue];
    float money = [[NSString stringWithFormat:@"%@",_SearchModel.emoney]floatValue];
    float finlishInt = priceStr/money;
    if (finlishInt>=1) {
        finlishInt = 1;
    }
    if (finlishInt>0 &&finlishInt<0.01) {
        finlishInt = 0.01;
    }
    self.progreesView.percent = finlishInt;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
